package org.erepublik.company.comparators;

import java.util.Comparator;

import org.erepublik.company.product.Weapons;

public class WeaponComparatorByPricePerUse implements Comparator<Weapons> {
    
    
    public int compare(Weapons o1, Weapons o2) {
        double comparator = o2.getPricePerUse() - o1.getPricePerUse() ;

        if (comparator < 0.0)
            return 1;
        if (comparator > 0.0)
            return -1;
        return 0;
    }
}

